home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_3 / frxshell.ads < prev    next >
Text File  |  1995-07-21  |  5KB  |  112 lines

  1. Short:    Shell in a FrexxEd buffer
  2. Author:   s6357@fb1.fhtw-berlin.de (Carsten Orthbandt)
  3. Uploader: s6357@fb1.fhtw-berlin.de (Carsten Orthbandt)
  4. Type:     text/edit
  5.  
  6. This was one idea from Jesper Skov. Since redirecting a shell to
  7. a FrexxEd buffer doesn┤t work for real, this is not a real shell.
  8.  
  9. ############################################
  10. File:        FrexxShell.FPL
  11. Author:        Carsten Orthbandt
  12. Email:        s6357@fb1.fhtw-berlin.de
  13. Short:        gives you a virtual shell in FrexxEd.
  14. Version:    1.0
  15. Date:        5.7.95
  16. Local settings:
  17. Global settings:
  18. Keysequence:    "Enter","Tab"
  19. Type:        Key/Function
  20. Prereq:        FrexxEd v1.6 fpl.library v12.1
  21. ############################################
  22.  
  23. FUNCTION
  24.   This little hack gives you a shell in a FrexxEd buffer. It includes a nice
  25.  file name completion feature (assigned to TAB).
  26.  When started, this scripts opens a new buffer, sets up a shell environment
  27.  for it and does a little echo. From now on you may use it as a real shell.
  28.  You enter commands BEHIND the prompt "Sys:>" and get the output.
  29.  To quit this little shell, simply kill the buffer. There is no real shell
  30.  behind it┤s functionality.
  31.  
  32. REQUIREMENTS
  33.  You need a fpl.library supporting string catenation with "+". This works
  34.  since version 12.1.
  35.  You need a path to the following commands:
  36.  - Execute
  37.  - Delete
  38.  It might be useful to have these commands resident.
  39.  
  40. COMMENT
  41.  FrexxShell uses four temporary files:
  42.   FConCmd_xxx - the command script
  43.   FConOut_xxx - the commands output
  44.   FConDir_xxx - the current dir after execution
  45.   FConErr_xxx - error messages
  46.  Although temp file names are unique you can┤t run two shell buffers from
  47.  the same FrexxEd session. This would require all variables to be local
  48.  info vars. In my opinion, this is not very useful.
  49.  The output (FConOut) is deleted after it has been loaded into Fred because it
  50.  can get very long (try "list SYS: ALL"). All other files remain. I tried to
  51.  get them deleted too, but somehow FrexxEd crashed everytime I did.
  52.  You shouldn┤t mind it since they all sum to a total of 7 lines (maximum).
  53.  
  54.  FrexxShell searches the last line of the buffer for ">". This char marks
  55.  the end of prompt. You may change any contents of shell buffer, but commands
  56.  are only executed if enterd behind that first ">".
  57.  
  58.  FrexxShell assigns it┤s routine to the "Enter" key (means "Return" too). It
  59.  simply does a Output("\n") if the current buffer is not the shell buffer.
  60.  I wanted to execute the old function of this key, but KeyPress() seems not
  61.  to work by now.
  62.  
  63. BUGS
  64.  1) You can┤t use interactive input. This should not be a real problem since
  65.     FrexxShell redirects all input to NIL:. So all that happens if you
  66.     type "DIR ?" is what happens you if press Return on every request in a
  67.     real shell.
  68.  2) You can┤t get a return code. Since FrexxShell has to know the current
  69.     directory after execution of the command line (might be "cd ram:"), it
  70.     does a "cd" directly after command execution. To get information about
  71.     failed statements all error outputs are displayed.
  72.  3) You should never re-use a shell buffer for normal text editing since
  73.     every time you press Return the last line will be interpreted as a shell
  74.     command.
  75.  4) FrexxShell should not be run twice from the same FrexxEd.
  76.  5) Since there is no real shell behind it, no Shell-Startup, Aliases or
  77.     local variables are possible.
  78.  6) Change count is reset after each command to avoid that annoying requester
  79.     if you quit a FrexxShell buffer.
  80.  7) If you quit one Buffer and open a new directly after chances are high to
  81.     get the same buffer id again. So you get a new shell without calling
  82.     FrexxShell.FPL for that new buffer. This could be solved by hooking into
  83.     Quit(). I┤ll surely add this when KeyPress() gets fixed, which is required
  84.     for a real clean-up.
  85.  
  86. FUTURE
  87.  - Proper clean-up: Will be done when KeyPress() works finally.
  88.  
  89. ------------------------------------------------------------
  90.                  Amiga Distribution System
  91. ------------------------------------------------------------
  92.  
  93.                         ADS Zone: 1
  94.                   ADS Hatch Site: Don Plesky
  95.               ADS Position: ADS Zone 1 Coordinator
  96.                  BBS Name: EastPointe Amiga BBS
  97.                  Phone Number(s): 810-773-6959
  98.                  Network Address: 1:120/229  
  99.                      Network Region: 11    
  100.                    BBS Hours: 24 Hrs/Day
  101.            BBS Mailer/Software: DLG Trapdoor/PDQmail
  102.                    BBS Storage Space: 2 Gig 
  103.                File Requestable :  <X> Y     < > N
  104.                File Request Hours : All The Time
  105.  
  106.  
  107.  
  108. ---------------------------------------------------------------
  109. Help the Amiga! Join the ADS team Become a ADS Hub<=>Freq ADSINFO 
  110. ---------------------------------------------------------------
  111.  
  112.